import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { resolve } from "path";
import { viteMockServe } from "vite-plugin-mock";

// https://vite.dev/config/
export default defineConfig({
	plugins: [
		vue(),
		viteMockServe({
			mockPath: "./mock",
			enable: true, // 是否启用 mock
		}),
	],
	resolve: {
		//  path alias 别名
		alias: {
			"@": resolve(__dirname, "src"),
		},
	},
});
